iphoneDeviceResolution
Type
function
Summary
Returns the device's screen resolution in pixels
Syntax
iphoneDeviceResolution()
Description
Use the iphoneDeviceResolution function to find the resolution of the device's screen in pixels
The iphoneDeviceResolution function returns the resolution of the device's screen in pixels.
The new iPhone 4 has a display with double the resolution in both horizontal and vertical directions. By default, iOS handles this by mapping one logical 'point' to two physical 'pixels' with applications (LiveCode included) interpreting everything in terms of logical points. This means that apps targetted for older devices will run identically on the newer iPhone 4 devices.
The screenRect and associated properties all deal in logical points, they do not reflect the actual device resolution at which the app is being displayed. To fetch the device screen's resolution in pixels use the iphoneDeviceResolution function.
Examples
put iphoneDeviceResolution() into tScreenResolution
Related
command: iphoneUseDeviceResolution
function: screenRect, iphoneDeviceScale
Compatibility and Support
Introduced
LiveCode 4.5.2
OS
ios
Platforms
mobile